use "$dataDir/dataset_admin_fabrica", replace
	
		local depvar "sugarcaneprocessedraw  total_sugar_production"
		local cluslvl "id_mills"
		
	foreach var in `depvar'{
	reghdfe `var' afterXtreatment, abs(id_mills i.year#i.month) vce(cluster `cluslvl')
		estimates store `var'
	qui sum `var' if e(sample)==1 & year<2015
		local mean1=r(mean)
		estadd scalar mean1 `mean1' : `var'
		estadd local moyearfe "Yes"
		estadd local millfe "Yes"	
		estadd local cluslvl "Mill"			
	}
		
		********************************************************************************
	esttab sugarcaneprocessedraw total_sugar_production using "$mainDir/tables/TabA4_main_outputs.tex", replace b(%12.3fc) se(%12.3fc) keep(afterXtreatment) varlabels(afterXtreatment  "After 2015 $\times$ Regulated") label starl(* 0.1 ** 0.05 *** 0.01) stats(mean1 N r2 moyearfe millfe cluslvl, fmt(%12.3fc %12.0fc %12.3fc) label("Pre 2015 Mean" "Obs." "R-squared" "Month by Year FE" "Mill FE" "Cluster level")) nonotes